# 需求：打开注册页面A，暂停2秒后，滚动条拉到最底层

from time import sleep
from selenium import webdriver
from selenium.webdriver import ActionChains
from selenium.webdriver.common.by import By
# 1.打开浏览器
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.select import Select
from selenium.webdriver.support.wait import WebDriverWait

driver = webdriver.Chrome(executable_path='chromedriver.exe')
# 2.输入访问地址（URL）
driver.get("http://121.43.169.97:8848/pageA.html")

sleep(2)# 暂停2秒
# 滚动条拉到最底层
js = "window.scrollTo(0,1000)"
# 调用执行js语句方法
driver.execute_script(js)
sleep(2)
# 滚动条拉到最上层
js = "window.scrollTo(0,0)"
driver.execute_script(js)